/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package CrawlerExtractor;

import CrlException.CrlException;

/**
 *
 * @author CUHUUHOANG
 */
public class Data implements ExtractorInterface.ExtractorData {

    public static String DatabaseName;
    public static String hostMySQL;
    public static String username;
    public static String password;

    @Override
    public String getTableName() throws CrlException {
        try {
            return "ted_com_speakers";
        } catch (Exception ex) {
            throw new CrlException(ex.getMessage());
        }

    }

    @Override
    public String[] getAtributes() throws CrlException {
        try {
            return new String[]{"url", "title", "description", "keywords", "reason", "home", "website", "twitter", "imglink"};
        } catch (Exception ex) {
            throw new CrlException(ex.getMessage());
        }

    }

    @Override
    public String getSeedURL() throws CrlException {
        try {
            return "http://www.ted.com/speakers";
        } catch (Exception ex) {
            throw new CrlException(ex.getMessage());
        }

    }

    @Override
    public String getImageAtrributeName() throws CrlException {
        try {
            return "imglink";
        } catch (Exception ex) {
            throw new CrlException(ex.getMessage());
        }

    }

    @Override
    public void setDatabaseInfo(String DatabaseName, String hostMySQL, String username, String password) throws CrlException {
        try {
            this.DatabaseName = DatabaseName;
            this.hostMySQL = hostMySQL;
            this.username = username;
            this.password = password;
        } catch (Exception ex) {
            throw new CrlException(ex.getMessage());
        }

    }
}
